<template>
  <div class="app">
    <div>
      <router-link to="/counter">计数器</router-link> |
      <router-link to="/list">商品列表</router-link> |
      <router-link to="/cart">购物车({{ totalCount }})</router-link> |
    </div>
    <router-view />
  </div>
</template>

<script>
import { mapState } from 'pinia'
import useCartStore from './store/shoppingcart'

export default {
  name: 'App',
  computed: {
    ...mapState(useCartStore, ['totalCount'])
  },
}
</script>

<style scoped>

</style>
